package com.fenyin.samples.study.parttern.struct.decorate.example1;  

/**
 *@Title: 装饰模式
 *<p>SaleOrder：具体构件</p>  
 *@Author:fengzhichao  
 *@Since:2012-9-29  
 *@Version:1.1.0
 */
public class SaleOrder extends Order{
	
	public SaleOrder(){
		
	}
	
	public static void main(String[] args){
		//关键是附加的功能能组合实现，通过排列组合方式实现
		Order order = new SaleOrder();
		order.addOrderLine(new OrderLine("鼠标",25));
		order.addOrderLine(new OrderLine("电视",21));
		Order orderDecotator = new OrderHeadDecorator(new OrderFootDecorator(order));
		orderDecotator.print();
	}
}
